Skip to content

Conversation

Lattay
Copy link

@Lattay Lattay commented Nov 1, 2023

Hi,

I want to use your sphinx-lua project and I noticed that currently all leading spaces are removed from each line.
This is not compatible with the significant indentation used in rst syntax. For example a multiline list would not be handled as expected:

--- Foo
--- * single line elements works as expected
--- * multi line elements
---   are supposed to be aligned with the previous lines
--- * but the leading spaces are removed by the parser
function foo()
    print("foo")
end

This PR simply change the line where the leading comment mark was removed to remove at most one leading space.
The problem was that the lstrip method takes a list of independent characters as an argument, not a fixed string.

Hopefully, this fix fits your vision for this project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant